const { contextBridge, ipcRenderer } = require("electron");

contextBridge.exposeInMainWorld("myAPI", {
    electron: () => {
        console.log(require("electron"));
    },
    remote: () => require("electron").remote,
    getMainWindow: function () {
        return require("electron").BrowserWindow.getFocusedWindow(); // 或使用特定标识找到 mainWindow
    },

    print: (data) => {
        ipcRenderer.send("print", data);
    },
});
